﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FTradeReceivablesTuiJi.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.FTradeModel.FTradeReceivablesTuiJi" %>
<%--退机操作--%>
<script type="text/javascript">

    $(document).ready(function () {

        $("#FTradeReceivablesTuiJi_Price,#FTradeReceivablesTuiJi_GPSFeiYong,#FTradeReceivablesTuiJi_YueCuXiaoJinE").change(function () {
            changeHHeTongJinE()
        })
        function changeHHeTongJinE() {
            //处理合同金额
            if ($(this).val() == "")
                $(this).val(0);
            var Price = parseFloat($("#FTradeReceivablesTuiJi_Price").val());
            var GPSFeiYong = parseFloat($("#FTradeReceivablesTuiJi_GPSFeiYong").val());
            var YueCuXiaoJinE = parseFloat($("#FTradeReceivablesTuiJi_YueCuXiaoJinE").val());

            $("#FTradeReceivablesTuiJi_HeTongJinE").val((-1) * Price + GPSFeiYong + YueCuXiaoJinE);
        }
        $("#FTradeReceivablesTuiJi_GPSFeiYong").val((-1) * parseFloat($("#FTradeReceivablesTuiJi_GPSFeiYong").val()));
        $("#FTradeReceivablesTuiJi_YueCuXiaoJinE").val((-1) * parseFloat($("#FTradeReceivablesTuiJi_YueCuXiaoJinE").val()))

        changeHHeTongJinE();
    })
    function validateCallbackFTradeReceivablesTuiJi(form, callback) {

        var $form = $(form);
        $("#FTradeReceivablesTuiJi_BtnSave").find("button").attr("disabled", "disabled").html("退机中......");
       // setTimeout(function () { $("#FTradeReceivablesTuiJi_BtnSave").find("button").removeAttr("disabled").html(" 退 机 "); }, 10000);

        return validateCallback(form, callback);
    }
</script>
<div class="pageContent">
	<form  method="post" action="FTradeModel/FTradeReceivablesTuiJi.aspx?ajaxmethod=add&FTradeID=<%=FTradeID %>" class="pageForm required-validate" onsubmit="return validateCallbackFTradeReceivablesTuiJi(this, navTabAjaxDone);" >
		<div class="pageFormContent" layoutH="56">
            <h2 style="clear:both; padding:5px; border-bottom:1px solid #B8D0D6; margin-bottom:5px; ">
                退机说明:
            </h2>
            <div style=" line-height:23px;clear:both; padding:5px; border:1px solid #B8D0D6;margin-bottom:5px; ">
                1.系统自动对此合同<b>[<%=obj.HeTongHao%>]</b>的已冲帐记录进行收回,并自动创建一条收款记录,退机后将转向冲帐界面进行冲帐.<br />
                2.必需手工修改以下退机信息(默认信息与原信息一致).<br/>
                3.如果此合同没有冲过帐，则退机后，不会转向冲帐界面.                
            </div>
      
            <div style="clear:both;margin-bottom: 5px;"></div>
            <h2 style=" padding:5px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">退机信息 【<a href="FTradeModel/FTradeReceivablesView.aspx?FTradeID=<%=FTradeID %>" target="navTab" title="查看数据源" rel="FTradeReceivablesView" style=" font-weight:normal!important; color:Red;" >点击</a>】可查看原合同的详细信息</h2>
			    <p>
				<label>合 同 号：</label>
				<input name="HeTongHao" type="text" id="FTradeReceivablesTuiJi_HeTongHao" class="required" readonly value="<%=obj.HeTongHao %>" />
			    </p>
			    <p>
				    <label>退机时间：</label>
				    <input name="XiaoShouShiJian" class="required " type="text" value="<%=obj.XiaoShouShiJian.ToString("yyyy-MM-dd") %>"  alt="请输入退机时间"  />
			    </p>
			    <p>
				    <label>经 销 商：</label>
                    <input name="JingXiaoShang" type="text" value="<%=obj.JingXiaoShang %>"  class="required textInput "  readonly/>
			    </p>
                <p>
				    <label>营业经理：</label>
				    <input name="YingYeJingLi" class="required" type="text"  value="<%=obj.YingYeJingLi %>" alt="请输入营业经理" />
			    </p>
                <div class="divider"></div>
			    <p>
				    <label>型    号：</label>
                    <input name="XingHao" class="required" type="text"  value="<%=obj.XingHao %>" readonly/>
			    </p>
                <p>
				    <label>机    号：</label>
				    <input name="JiHao" class="required" type="text" size="" alt=""  value="<%=obj.JiHao %>" readonly />
			    </p>
                <div class="divider"></div>
			    <p>
				    <label>单    价：</label>
				    <input id="FTradeReceivablesTuiJi_Price" name="Price" class="required inputFloat" type="text" value="<%=obj.Price %>" size="" alt="" />
                    <span class="unit">元</span>
			    </p>
                <p>
				    <label>GPS费 用：</label>
				    <input id="FTradeReceivablesTuiJi_GPSFeiYong" name="GPSFeiYong" class="required inputFloat" type="text" value="<%=obj.GPSFeiYong %>" size="" alt="" />
                    <span class="unit">元</span>
			    </p>
                <p>
				    <label>月促销折让金额：</label>
                    <input id="FTradeReceivablesTuiJi_YueCuXiaoJinE" name="YueCuXiaoJinE" class="required inputFloat" type="text" value="<%=obj.YueCuXiaoJinE %>" size="" alt="" />
                    <span class="unit">元</span>
			    </p>
                 <p>
				        <label>GPS 号：</label>
				        <input name="GPSNum" class="" type="text" value="<%=obj.GPSNum %>" size="" alt="" readonly/>
			        </p>     
                <div class="divider"></div>
			    <p>
				    <label>合同金额：</label>
				    <input id="FTradeReceivablesTuiJi_HeTongJinE" name="HeTongJinE" class="required inputFloat" type="text"   value="<%=obj.HeTongJinE %>"  size="" alt=""/>
                    <span class="unit">元</span>
			    </p>
              
                <div style="clear:both;"></div>
            
				<label>合同付款条款：</label>
				<textarea name="FuKuanTiaoKuan" cols="80" rows="4"  ><%=obj.FuKuanTiaoKuan%></textarea>
                <div style="clear:both;"></div>
                <p>
			        <label>已收款项：</label>
			        <input name="YiShouKuanXiang" class="" type="text" readonly value="<%=obj.YiShouKuanXiang %>"　readonly />
		        </p>
                <p>
			        <label>未收款项：</label>
			        <input name="WeiShouKuanXiang" class="" type="text" readonly value="<%=obj.WeiShouKuanXiang %>"　readonly />
		        </p>
                <p>
			        <label>逾期款项：</label>
			        <input name="YuQiKuanXiang" class="" type="text" readonly value="<%=obj.YuQiKuanXiang %>"  alt=""/>
		        </p>
               <div style="clear:both;margin-bottom: 5px;"></div>

        </div>
		<div class="formBar">
			<ul>
				
				<li ><div id="FTradeReceivablesTuiJi_BtnSave" class="buttonActive"><div class="buttonContent"><button type="submit"  >退机</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>